package top.purity.server.user.controller;

import lombok.RequiredArgsConstructor;
import top.purity.framework.common.result.RespResult;
import top.purity.server.user.controller.vo.PermissionVO;
import top.purity.server.user.service.PermissionService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @version 1.0
 * @Author Lmh
 * @Description
 * @CreateTime 2023-10-27 23:33
 */
@RestController
@RequestMapping("/permission")
@RequiredArgsConstructor
public class PermissionController {

    private final PermissionService permissionService;

    @GetMapping("/getUserPermission")
    public RespResult getUserPermission() {
        List<PermissionVO> permission = permissionService.getUserPermission();
        return RespResult.ok(permission);
    }

}
